<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NumCpp: nc::pybindInterface Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NumCpp
   &#160;<span id="projectnumber">2.3.1</span>
   </div>
   <div id="projectbrief">A Templatized Header Only C++ Implementation of the Python NumPy Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('namespacenc_1_1pybind_interface.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">nc::pybindInterface Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a0ca16a67f36ad5d1960cd9567208ed19"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19">ReturnPolicy</a> { <a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19ae8606d021da140a92c7eba8d9b8af84f">ReturnPolicy::COPY</a>, 
<a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19adcd320d017d7f3c317bc8b234287bc9f">ReturnPolicy::REFERENCE</a>, 
<a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19a9419303c1fae01a65adc8d1835aa2c6d">ReturnPolicy::TAKE_OWNERSHIP</a>
 }</td></tr>
<tr class="memdesc:a0ca16a67f36ad5d1960cd9567208ed19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enum for the pybind array return policy.  <a href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19">More...</a><br /></td></tr>
<tr class="separator:a0ca16a67f36ad5d1960cd9567208ed19"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a36135ab669dc2e6659bb9564e402edb4"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a36135ab669dc2e6659bb9564e402edb4"><td class="memTemplItemLeft" align="right" valign="top">pybind11::array_t&lt; dtype &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1pybind_interface.html#a36135ab669dc2e6659bb9564e402edb4">nc2pybind</a> (<a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inArray, <a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19">ReturnPolicy</a> returnPolicy=<a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19ae8606d021da140a92c7eba8d9b8af84f">ReturnPolicy::COPY</a>)</td></tr>
<tr class="separator:a36135ab669dc2e6659bb9564e402edb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f1f494ed8dc86610403627954600812"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a4f1f494ed8dc86610403627954600812"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1pybind_interface.html#a4f1f494ed8dc86610403627954600812">pybind2nc</a> (pybind11::array_t&lt; dtype, pybind11::array::c_style &gt; &amp;numpyArray)</td></tr>
<tr class="separator:a4f1f494ed8dc86610403627954600812"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:abde82685837c3645f506b0800472ffbc"><td class="memItemLeft" align="right" valign="top">static const std::map&lt; <a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19">ReturnPolicy</a>, std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacenc_1_1pybind_interface.html#abde82685837c3645f506b0800472ffbc">returnPolicyStringMap</a></td></tr>
<tr class="separator:abde82685837c3645f506b0800472ffbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a0ca16a67f36ad5d1960cd9567208ed19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ca16a67f36ad5d1960cd9567208ed19">&#9670;&nbsp;</a></span>ReturnPolicy</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19">nc::pybindInterface::ReturnPolicy</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enum for the pybind array return policy. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a0ca16a67f36ad5d1960cd9567208ed19ae8606d021da140a92c7eba8d9b8af84f"></a>COPY&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a0ca16a67f36ad5d1960cd9567208ed19adcd320d017d7f3c317bc8b234287bc9f"></a>REFERENCE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a0ca16a67f36ad5d1960cd9567208ed19a9419303c1fae01a65adc8d1835aa2c6d"></a>TAKE_OWNERSHIP&#160;</td><td class="fielddoc"></td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a36135ab669dc2e6659bb9564e402edb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36135ab669dc2e6659bb9564e402edb4">&#9670;&nbsp;</a></span>nc2pybind()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">pybind11::array_t&lt;dtype&gt; nc::pybindInterface::nc2pybind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19">ReturnPolicy</a>&#160;</td>
          <td class="paramname"><em>returnPolicy</em> = <code><a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19ae8606d021da140a92c7eba8d9b8af84f">ReturnPolicy::COPY</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>converts a numcpp <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> to numpy array using pybind bindings</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inArray</td><td>the input array </td></tr>
    <tr><td class="paramname">returnPolicy</td><td>the return policy</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pybind11::array_t </dd></dl>

</div>
</div>
<a id="a4f1f494ed8dc86610403627954600812"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f1f494ed8dc86610403627954600812">&#9670;&nbsp;</a></span>pybind2nc()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;dtype&gt; nc::pybindInterface::pybind2nc </td>
          <td>(</td>
          <td class="paramtype">pybind11::array_t&lt; dtype, pybind11::array::c_style &gt; &amp;&#160;</td>
          <td class="paramname"><em>numpyArray</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>converts a numpy array to a numcpp <a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> using pybind bindings Python will still own the underlying data.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">numpyArray</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="abde82685837c3645f506b0800472ffbc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abde82685837c3645f506b0800472ffbc">&#9670;&nbsp;</a></span>returnPolicyStringMap</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::map&lt;<a class="el" href="namespacenc_1_1pybind_interface.html#a0ca16a67f36ad5d1960cd9567208ed19">ReturnPolicy</a>, std::string&gt; nc::pybindInterface::returnPolicyStringMap</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= { {ReturnPolicy::COPY, <span class="stringliteral">&quot;COPY&quot;</span>},</div>
<div class="line">        {ReturnPolicy::REFERENCE, <span class="stringliteral">&quot;REFERENCE&quot;</span>},</div>
<div class="line">        {ReturnPolicy::TAKE_OWNERSHIP, <span class="stringliteral">&quot;TAKE_OWNERSHIP&quot;</span>} }</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacenc.html">nc</a></li><li class="navelem"><a class="el" href="namespacenc_1_1pybind_interface.html">pybindInterface</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
